import PySpice

motors=PySpice.getvar('motornames')
motoralias=PySpice.getvar('motoralias')
motorupper=PySpice.getvar('motorupperlimits')
motorlower=PySpice.getvar('motorlowerlimits')
motorzero=PySpice.getvar('motorzeros')
motortolerance=PySpice.getvar('motortolerance')

icount=0

header1='Motor Names'
header2='Motor Alias'
header3='Upper Limit'
header4='Lower Limit'
header5='Motor Zero'
header6='Tolerance'

outstring= "%13s %13s %13s %13s %13s %13s \n" % (header1, header2, header3, header4, header5, header6)

for item in motors:
    outstring=outstring + "%13s %13s %13g %13g %13g %13g \n" % (item, motoralias[icount], motorlower[icount], motorlower[icount], motorzero[icount], motortolerance[icount])
    icount+=1

print outstring
print "\n Motor information completed."
    
